package com.dingreading.cloud.soms.service;

import com.alibaba.fastjson.JSONObject;
import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.soms.dto.StoreSignInDto;
import com.dingreading.cloud.soms.entity.StoreSignIn;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2024-09-11
 */
public interface StoreSignInService extends IService<StoreSignIn> {

    Page<StoreSignInDto> pageList(PageUtil pageUtil, Long storeId, String storeUid, String keyword, Integer status,
                                  String beginDate, String endDate, Integer readStatus);

    JSONObject todayList(long storeId, String memberName, Integer status, String date);

    List<StoreSignIn> getStoreSignInList(Long storeId, String storeUid, String keyword, Integer status,
                                         String beginDate, String endDate, Integer readStatus);

    // 按日期、会员uid和日期去重，获取会员的出勤次数
    LinkedHashMap<String, Integer> getMemberSignInNum(Long storeId, List<String> memerUids, String beginDate, String endDate);

    // 会员uid和日期去重，获取会员的出勤总次数
    LinkedHashMap<String, Integer> getMemberSignInCnt(List<String> memerUids);

}
